<?php
require_once dirname(__FILE__)."/../config/dbconn.php";  

class Pagination extends Dbconn {
    function posts_count(){
        $sql = Pagination::getConnect()->query("
                 SELECT count(id) 
                 FROM posts 
                 ORDER by id DESC");
        return $sql;
    } 
    
   /* function get_posts($arr){
        $sql = Pagination::getConnect()->prepare("
               SELECT * 
               FROM posts ORDER by id ASC 
               LIMIT :start, 
                     :num
               ");
        $sql->execute($arr);
        return $sql;
    } */
 
}   

